// ScrollerLayout.h: interface for the ScrollerLayout class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_SCROLLERLAYOUT_H__3D8D0675_A488_11D2_A452_006097A44215__INCLUDED_)
#define AFX_SCROLLERLAYOUT_H__3D8D0675_A488_11D2_A452_006097A44215__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include "Scroller.h"

class CLASS_DECL_D ScrollerLayout : public AWTLayout,  
											              public AWTLayoutManager
{
DECLARE_DYNAMIC(ScrollerLayout)
public:
	ScrollerLayout(Scroller* scroller);
	virtual ~ScrollerLayout();

	virtual void addLayoutComponent(CString* name, AWTComponent* comp);
	virtual void addLayoutComponent(AWTComponent* comp, AWTObject* constraints){};
  virtual void removeLayoutComponent(AWTComponent* comp); 
	virtual CSize preferredLayoutSize(AWTContainer* parent);
	virtual CSize minimumLayoutSize(AWTContainer* parent);
	virtual void layoutContainer(AWTContainer* target);
	virtual AWTLayoutManager* getLayoutManager()
		{return static_cast<AWTLayoutManager*>(this);}

private:
	void reshapeHorizontalScrollbar();
  void reshapeVerticalScrollbar();
	void reshapeViewport(); 

	Scroller* m_scroller;
	AWTScrollbar* m_hbar;
	AWTScrollbar* m_vbar;
	CString m_hbarPosition;
	CString m_vbarPosition;
	AWTComponent* m_viewport;
	int m_top;
	int m_bottom;
	int m_right;
	int m_left;
};

#endif // !defined(AFX_SCROLLERLAYOUT_H__3D8D0675_A488_11D2_A452_006097A44215__INCLUDED_)
